import { defineStore } from "pinia";
import {reactive, ref} from 'vue'
import { getAllRoleApi } from '@/api/role'
export default defineStore('role',()=>{
   let roledialogvisible = ref(false)

   let allRole =ref([])
    let getAllRole = ()=>{
        getAllRoleApi().then(res=>{
            console.log(res);
            allRole.value = res.data.data
            console.log(allRole.value);
        })
    }
   return{allRole,getAllRole,roledialogvisible}
},{
    persist:true,
})